package thread.createthread;

/**
 * @author cyt
 * @create 2020-03-03 15:49
 */
public class NewThreadTwo {
    public static void main(String[] args) {

        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i <= 10; i++) {
                    System.out.println("当前的线程为：" + Thread.currentThread().getName() + " -->" + i);
                    try {
                        Thread.sleep(500);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        });
        t1.start();
    }
}
